﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Text.model;
using Test.BLL;

namespace Test.Ul
{
    public partial class StuInfoADD : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            var name = TextBox1.Value;
            var commnet = TextBox2.Text;

            Text.model.StuInfo info = new Text.model.StuInfo()
            {
                Name = name,
                Comment = commnet
            };
            if (BLL.StuInfoBLL.Insert(info) > 0)
            {
                Response.Write("<script>alert('添加成功');location='StuInfo.aspx'</script>");
            }
        }
    }
}